#pragma once
#include "conn.h"

using std::string;
class manager;
class back : public conn{
public:
	back();
	~back();

	void setFd(int fd);
	void setManager(manager * m);
	int setAddrInfo(const string&ip, int port);

	void input();
	void output();
	void timeout();
	
	int connect(const string &ip, int port);
	int send(const char* msg, int msg_len);
	void close();
	
private:
	char buffer[10240];
	int size;
	string backip;
	int backport;
public:
	manager * boss;
};

